﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace ProtocolBuilder
{
    static class TextHelper
    {
        public const string HtmlNewLine = "<br />";
        public const string HtmlTab = "&nbsp;&nbsp;&nbsp;&nbsp;";
        public const string HtmlSpace = "&nbsp;";

        public static string TransferToHtmlContent(this string original)
        {
            return original.Replace(" ", HtmlSpace)
                .Replace("\r\n", HtmlNewLine)
                .Replace("\r", HtmlNewLine)
                .Replace("\n", HtmlNewLine)
                .Replace("\t", HtmlTab);
        }
    }
}
